<template>
    <div style="background: #F7F7F7">
      <mt-cell title="收到的赞" is-link @click.native="zan()" style="margin-top: 0.3rem">
        <img slot="icon" src="../../../src/assets/img/person/zan.png" style="width: 0.54rem;margin-right: 0.2rem">
				<div v-if="likecount!=0||likecount!='0'">
					<span class="number" v-if="Number(likecount)<99">
					 {{likecount}}
					</span>
					<span class="number" v-else>
					 99+
					</span>
				</div>
      </mt-cell>
      <mt-cell title="账户通知" is-link @click.native="tongzhi()">
        <img slot="icon" src="../../../src/assets/img/person/tongzhi.png" style="width: 0.54rem;margin-right: 0.2rem">
				<div  v-if="accountcount!=0||accountcount!='0'">
					<span class="number" v-if="Number(accountcount)<99">
					 {{accountcount}}
					</span>
					<span class="number" v-else>
					 99+
					</span>
				</div>
      </mt-cell>


    </div>
</template>

<script>
    export default {
        name: "Xiaoxi",
      data(){
          return{
            ke:[],
						accountcount:0,
						likecount:0,
          }
      },
      methods:{
          tongzhi(){
            this.$router.push({
              path:'/tongzhi'
            })
          },
        zan(){
          this.$router.push({
            path:'/zan'
          })
        },
				// 消息通知数量接口
				msgCount(){
				
					this.axios.get(this.$store.state.url +'User/msgCount').then(res=>{
						if (res.data.errcode == 0||res.data.errcode == '0'){
							// console.log(res.data);
							this.msgcount = res.data.data;
							this.likecount = this.msgcount.like_count;
							this.accountcount = this.msgcount.account_count;
						}
					})
				
				},
      },
			mounted(){
				this.sdk.getJSSDK('','',this.$store.state.url);	
				  this.msgCount();
// 				this.likecount = this.$route.query.likecount;
// 				this.accountcount = this.$route.query.accountcount;
			}
    }
</script>

<style scoped>
  .kong{
    width: 2.8rem;
    margin-top: 36%;
  }
  .number{
    /* width: 0.28rem; */
    height: 0.28rem;
    display: inline-block;
    background: #FE3434;
    border-radius: .3rem;
		padding: 0 .17rem;
    font-size:0.24rem;
    font-weight:500;
    color:rgba(255,255,255,1);
    text-align: center;
    line-height: 0.28rem;
		background: #FF0214 !important;
  }
  .con{
    width: 92%;
    margin: auto;
    margin-top: 0.3rem;
  }
  .p1{
    font-size:0.34rem;
    font-weight:bold;
    color:rgba(51,51,51,1);
    line-height:0.32rem;
  }
  .ke{
    width: 100%;
    margin-top: 0.3rem;
  }
  .img1{
    width: 100%;
    height: 3.3rem;
    border-radius:0.08rem;
  }
  .ke p:nth-child(2){
    font-size:0.28rem;
    color:rgba(51,51,51,1);
    line-height:0.32rem;
    margin-top: 0.2rem;
  }
  .bto{
    margin-top: 0.2rem;
  }
  .bto img{
    width: 0.32rem;
    height: 0.32rem;
    vertical-align: middle;
  }
  .bto span{
    font-size:0.24rem;
    color:rgba(194,201,211,1);
    line-height:0.32rem;
    vertical-align: middle;
  }
  .bto span:nth-child(5){
    float: right;
  }
</style>
